package com.classtest01;

public class Test01 {
    public static void main(String[] args) {

        Point point = new Point();
        point.getSum(3, 4);
    }
}

class Point {
    private double x;
    private double y;

    public double getX() {
        return x;
    }

    public void setX(double x) {
        this.x = x;
    }

    public double getY() {
        return y;
    }

    public void setY(double y) {
        this.y = y;
    }

    public Point(double x, double y) {
        this.x = x;
        this.y = y;
    }

    public Point() {

    }

    public void getSum(double x, double y) {
        if (x == 0) {
            System.out.println("两个坐标轴的距离为：" + y);
        }
        if (y == 0) {
            System.out.println("两个坐标轴的距离为：" + x);
        }
        System.out.println(Math.sqrt(x * x + y * y));
    }

}